Dynomotion

Group: DynoMotion Message: 345 From: Azd M Date: 5/3/2010
Subject: Motor Current Measurment in SnapAmp
Hi
I have 2 brushed motors connected to Kmotion Axes 2 and 3, and three brushed motors connected to the SnapAmp Axes 0,1 and 2.
How can I measure the currents of those motors using c program.


thanks
Group: DynoMotion Message: 346 From: Tom Kerekes Date: 5/3/2010
Subject: Re: Motor Current Measurment in SnapAmp
Hi Azd,
 
Here is a function that will return the approximate KMotion current magnitude for an axis channel in Amps. 
 
 
float GetCurrent(int ch)
{
 return (ADC(ch+4)+2048) * 4.85/4096;
}
 
Here is a method for reading SnapAmp #0
 
 double C0 = SNAP_CONVERT_ADC_TO_AMPS(ReadSnapAmp(SNAP0+SNAP_CURRENT_A0));
 double C1 = SNAP_CONVERT_ADC_TO_AMPS(ReadSnapAmp(SNAP0+SNAP_CURRENT_C0));
 double C2 = SNAP_CONVERT_ADC_TO_AMPS(ReadSnapAmp(SNAP0+SNAP_CURRENT_A1));
 double C3 = SNAP_CONVERT_ADC_TO_AMPS(ReadSnapAmp(SNAP0+SNAP_CURRENT_C1));

TK
 
 

Group: DynoMotion Message: 347 From: Azd Md Date: 5/3/2010
Subject: Re: Motor Current Measurment in SnapAmp
Thank you

--- On Tue, 4/5/10, Tom Kerekes <tk@...> wrote:

From: Tom Kerekes <tk@...>
Subject: Re: [DynoMotion] Motor Current Measurment in SnapAmp
To: DynoMotion@yahoogroups.com
Date: Tuesday, 4 May, 2010, 2:54 AM

 
Hi Azd,
 
Here is a function that will return the approximate KMotion current magnitude for an axis channel in Amps. 
 
 
float GetCurrent(int ch)
{
 return (ADC(ch+4)+2048) * 4.85/4096;
}
 
Here is a method for reading SnapAmp #0
 
 double C0 = SNAP_CONVERT_ ADC_TO_AMPS( ReadSnapAmp( SNAP0+SNAP_ CURRENT_A0) );
 double C1 = SNAP_CONVERT_ ADC_TO_AMPS( ReadSnapAmp( SNAP0+SNAP_ CURRENT_C0) );
 double C2 = SNAP_CONVERT_ ADC_TO_AMPS( ReadSnapAmp( SNAP0+SNAP_ CURRENT_A1) );
 double C3 = SNAP_CONVERT_ ADC_TO_AMPS( ReadSnapAmp( SNAP0+SNAP_ CURRENT_C1) );

TK